//
//  LGShareManager.h
//  ZCPlatformSDK
//
//  Created by Happy on 6/22/16.
//  Copyright © 2016 ZhanCheng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LGShareContent.h"

#define ZBShareWeiXinIsOpen 1
#define ZBShareWeiBoIsOpen 0
#define ZBShareQQIsOpen 0
#define ZBShareFaceBookIsOpen 0

#if ZBShareWeiXinIsOpen
#import "WXApi.h"
#endif

#if ZBShareQQIsOpen
#import <TencentOpenAPI/TencentOAuth.h>
#endif

#if ZBShareWeiBoIsOpen
#import "WeiboSDK.h"
#endif

#if ZBShareFaceBookIsOpen
#import "FBSDKCoreKit/FBSDKCoreKit.h"
#import <FBSDKShareKit/FBSDKShareKit.h>
#endif

// 分享方式
typedef NS_ENUM(NSInteger, LGShareType) {
    LGShareTypeWeiXin = 1,
//    LGShareTypeWeiQQ = 2,
//    LGShareTypeWeiBo = 3,
    LGShareTypeFacebook = 4
};


@class LGShareContent;
@interface LGShareManager : NSObject
@property (nonatomic, copy) NSString *shareId; //游戏的分享功能Id
@property (nonatomic, copy) NSString *weiXinAppId;

+ (LGShareManager *)shareInstance;

/**
 *  分享文本，目前只支持微信分享
 *

 **
 *  分享图片
 *
 *  可以直接指定要分享的图片或者其连接地址
 *

 **
 *  分享链接
 *
 *  微信分享可以指定Title、缩略图(不超过32k)和网址；Facebook分享不能指定缩略图。
 *

 **
 *  分享视频
 */
- (void)share:(LGShareContent *)shareContent shareType:(LGShareType)shareType callback:(void(^)(NSError *error, NSDictionary *result))callback;

@end


// 分享文字
//    shareContent.contentType = LGShareContentTypeText;
//    shareContent.contentText = @"分享Text";

// 分享图片
//    shareContent.contentType = LGShareContentTypeImage;
//    shareContent.imageURL = @"";
//    shareContent.thumbImageURL = @"";
//    shareContent.contentTitle = @"分享Title";
//    shareContent.contentDescription = @"分享Description";

// 分享链接
//    shareContent.contentType = LGShareContentTypeLink;
//    shareContent.contentTitle = self.shareDic[@"title"];
//    shareContent.contentDescription = self.shareDic[@"desc"];
//    shareContent.thumbImageURL = self.shareDic[@"image"];
//    shareContent.contentURL = self.shareDic[@"url"];
